﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UDPAgency
{
    internal class AgencyItem
    {
        public string LocalIP { get; set;}
        public int LocalPort { get; set; }

        public string RemoteIP { get; set; }
        public int RemotePort { get; set; }

        public string RemoteLocalIP { get; set; }
        public int RemoteLocalPort { get; set; }

        public string Name { get; set; }

        public override string ToString()
        {
            if (string.IsNullOrEmpty(Name))
            {
                Name = string.Format("{0}:{1} - {2}:{3}", LocalIP, LocalPort, RemoteIP,RemotePort);
            }
            return Name;
        }
    }
}
